
#include "SystemThreadHandle.h"
#include "SyncObject.h"

SystemThreadHandle::SystemThreadHandle() {
  // Bouml preserved body begin 0002D598
  // Bouml preserved body end 0002D598
}

SystemThreadHandle::~SystemThreadHandle() {
  // Bouml preserved body begin 0002D618
  // Bouml preserved body end 0002D618
}

SystemThreadHandle::SystemThreadHandle(const SystemThreadHandle & source) {
  // Bouml preserved body begin 0002D698
  // Bouml preserved body end 0002D698
}

SystemThreadHandle & SystemThreadHandle::operator=(const ThreadHandle * source) {
  // Bouml preserved body begin 0002D718
  // Bouml preserved body end 0002D718
}

//Creates new thread with as suspended.
Error::code SystemThreadHandle::Create(const ThreadStartRoutine & startRoutine) {
  // Bouml preserved body begin 0002D518
  // Bouml preserved body end 0002D518
}

//Returns object of current (calling) thread.
Error::code SystemThreadHandle::Current() {
  // Bouml preserved body begin 00026B18
  // Bouml preserved body end 00026B18
}

//Resumes this thread, or reduces its suspension count.
Error::code SystemThreadHandle::Resume() {
  // Bouml preserved body begin 00026898
  // Bouml preserved body end 00026898
}

//Suspends the thread, or increases its suspension counter.
Error::code SystemThreadHandle::Suspend() {
  // Bouml preserved body begin 00026918
  // Bouml preserved body end 00026918
}

//Terminates Running thread. Should be used with causion.
Error::code SystemThreadHandle::Terminate() {
  // Bouml preserved body begin 00026998
  // Bouml preserved body end 00026998
}

//Gives execution time, to another thread that is waiting.
//Error if no waiting threads.
Error::code SystemThreadHandle::Switch() {
  // Bouml preserved body begin 00026B98
  // Bouml preserved body end 00026B98
}

//Suspends current thread and yields for given time (in miliseconds)
Error::code SystemThreadHandle::Sleep(unsigned long int sleepTime) {
  // Bouml preserved body begin 00026C18
  // Bouml preserved body end 00026C18
}

//Our own startup routine for new thread.
DWORD WINAPI SystemThreadHandle::ThreadProc(LPVOID lpParameter)
{
  // Bouml preserved body begin 00031D2A
  // Bouml preserved body end 00031D2A
}

//To avoid exceptions during copying of these objects. Only Thread Ids are transfered.
//Later this method is responsible for preparing proper Handle to use.
void SystemThreadHandle::Prepare() {
  // Bouml preserved body begin 000320AA
  // Bouml preserved body end 000320AA
}

